import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import getters from './getters'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user
  },
  getters,
  state: {
    dialogVisible: false,
    dialogTitle: "",
    dialogOption: "",
  },
  mutations: {
    changeStatus(state, status) {
      state.dialogVisible = status
      state.dialogTitle = "添加商品"
      state.dialogOption = "add"
    }
  },
  actions: {
  },
})
